widget: Remove gtk_widget_style_get_property
authorTimm Bäder <mail@baedert.org>
Wed, 23 Nov 2016 19:19:44 +0000 (20:19 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 7 Jan 2017 16:19:30 +0000 (17:19 +0100)
docs/reference/gtk/gtk4-sections.txt
gtk/gtkwidget.c
gtk/gtkwidget.h

index 0791d1e6c4d7b67bb28fc838b90fcda00b267232..324dde559dda5620e4bd56cb2ff15f1840e81894 100644 (file)
@@ -4566,7 +4566,6 @@ gtk_widget_class_find_style_property
 gtk_widget_class_list_style_properties
 gtk_widget_send_focus_change
 gtk_widget_style_get
-gtk_widget_style_get_property
 gtk_widget_style_get_valist
 gtk_widget_class_set_accessible_type
 gtk_widget_class_set_accessible_role
index a3e12931d47249b310b338a20c2e1f4f395a304a..0be6b0df27e8d943b410b78e506f8b5989b75555 100644 (file)
@@ -11453,61 +11453,6 @@ gtk_widget_class_list_style_properties (GtkWidgetClass *klass,
   return pspecs;
 }
 
-/**
- * gtk_widget_style_get_property:
- * @widget: a #GtkWidget
- * @property_name: the name of a style property
- * @value: location to return the property value
- *
- * Gets the value of a style property of @widget.
- */
-void
-gtk_widget_style_get_property (GtkWidget   *widget,
-                              const gchar *property_name,
-                              GValue      *value)
-{
-  GParamSpec *pspec;
-
-  g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (property_name != NULL);
-  g_return_if_fail (G_IS_VALUE (value));
-
-  g_object_ref (widget);
-  pspec = g_param_spec_pool_lookup (style_property_spec_pool,
-                                   property_name,
-                                   G_OBJECT_TYPE (widget),
-                                   TRUE);
-  if (!pspec)
-    g_warning ("%s: widget class '%s' has no property named '%s'",
-              G_STRLOC,
-              G_OBJECT_TYPE_NAME (widget),
-              property_name);
-  else
-    {
-      GtkStyleContext *context;
-      const GValue *peek_value;
-
-      context = _gtk_widget_get_style_context (widget);
-
-      peek_value = _gtk_style_context_peek_style_property (context,
-                                                           G_OBJECT_TYPE (widget),
-                                                           pspec);
-
-      /* auto-conversion of the caller's value type
-       */
-      if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec))
-       g_value_copy (peek_value, value);
-      else if (g_value_type_transformable (G_PARAM_SPEC_VALUE_TYPE (pspec), G_VALUE_TYPE (value)))
-       g_value_transform (peek_value, value);
-      else
-       g_warning ("can't retrieve style property '%s' of type '%s' as value of type '%s'",
-                  pspec->name,
-                  g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
-                  G_VALUE_TYPE_NAME (value));
-    }
-  g_object_unref (widget);
-}
-
 /**
  * gtk_widget_style_get_valist:
  * @widget: a #GtkWidget
index ed3bfbbfbcd53f32b3d914ca4933cbcfdc426cde..33db17d6e4e4bed5c2d3df7e24797003ec6fbee8 100644 (file)
@@ -988,10 +988,6 @@ GDK_AVAILABLE_IN_ALL
 GParamSpec** gtk_widget_class_list_style_properties (GtkWidgetClass     *klass,
                                                     guint              *n_properties);
 GDK_AVAILABLE_IN_ALL
-void gtk_widget_style_get_property (GtkWidget       *widget,
-                                   const gchar    *property_name,
-                                   GValue           *value);
-GDK_AVAILABLE_IN_ALL
 void gtk_widget_style_get_valist   (GtkWidget       *widget,
                                    const gchar    *first_property_name,
                                    va_list         var_args);